package com.sky.factory;

/**
 * Created by Frank Lau on 2017/5/26 0026.
 */
public class OperationFactory {

    public static Operation createOperate(String operator) {

        Operation operation = null;

        switch (operator) {
            case "+":
                operation = new OperationAdd();
                break;
            case "-":
                operation = new OperationDelete();
                break;
            case "*":
                operation = new OperationMultiple();
                break;
            case "/":
                operation = new OperationDivide();
                break;

        }
        return operation;
    }
}
